1
用户体验、安全与生成式AI生命周期的基础
AI011Lesson 5
00:00

构建值得信赖的生成式AI需要在用户体验、强大安全性和一种专有的运营流程之间取得平衡,这种流程被称为 LLMOps

1. 信任体验

在设计AI界面时,我们必须平衡四大用户体验支柱:可用性、可靠性、可访问性和愉悦感。最终目标是实现一种 信任平衡

  • 不信任: 当用户因性能不佳或缺乏透明度而拒绝使用系统时。
  • 过度信任: 当用户对AI的人类化程度抱有不切实际的期望,并且未能验证其输出结果时。

提供 可解释性——即对AI如何生成特定输出的透明度——对于缓解这两种极端情况至关重要。

2. AI安全与漏洞

生成式AI引入了独特的安全威胁,传统网络安全框架必须加以适应(例如,使用MITRE ATLAS或OWASP LLM十大风险):

  • 数据污染: 通过操纵训练或检索数据来破坏模型的完整性(例如,标签翻转、特征污染或数据注入)。
  • 提示注入: 恶意操纵用户输入,以绕过安全防护机制,迫使模型执行未经授权的指令。

3. LLMOps生命周期

管理生成式AI应用需要一个专门的运营流程:

  • 构思阶段: 使用PromptFlow等工具进行快速原型设计和假设测试。
  • 构建阶段: 通过 检索增强生成(RAG) 或微调,使其连接到经过验证的数据。
  • 部署阶段: 持续监控诸如“真实性”(诚实性)和延迟等指标。例如,真实性可表示为 $G = \frac{\text{已验证事实}}{\text{总声明数}}$。
教学摩擦
有意在用户界面中引入“摩擦”(如免责声明或必经的验证步骤),提醒用户正在与AI交互,有助于管理预期并减少过度信任。
llm_ops_monitor.py
TERMINALbash — 80x24
> Ready. Click "Run" to execute.
>
Question 1
What is the primary risk of "Overtrust" in a Generative AI system?
Users reject the system due to poor performance.
Users have unrealistic expectations and fail to verify AI limitations.
The system experiences slower latency during generation.
Hackers can easily inject malicious prompts.
Question 2
Which security threat involves compromising the training or retrieval data to trigger specific model failures?
Prompt Injection
Data Poisoning
Hallucination
Instructional Friction
Challenge: Medical AI Assistant
Apply UX and Security principles to a high-stakes scenario.
You are designing an AI assistant for a medical firm. You must ensure the data is safe and the user knows the AI's limits.
Task 1
Implement a design element to reduce overtrust.
Solution:
Add a disclaimer or "Instructional Friction" that requires the user to acknowledge the AI can hallucinate and that outputs should be verified by a medical professional.
Task 2
Define a metric to measure if the AI is making up facts.
Solution:
Implement a "Groundedness" or "Honesty" metric to compare the AI's outputs strictly against a verified medical knowledge base (e.g., using RAG).